How to Bypass Request Lock message

Hi,

I am currently writing a script that goes through all of the modules in the company database and does some minor modifications.  However, the problem is that if a module is locked by someone then the script will pause.  Is there a way I can bypass any module that is under exclusive edit by another user?

Thanks.


ABoucaud - Wed Sep 27 16:40:07 EDT 2017

Re: How to Bypass Request Lock message
EHcnck - Fri Sep 29 14:58:29 EDT 2017

determine if a lock exist if so report it then continue on...

Re: How to Bypass Request Lock message
ABoucaud - Fri Sep 29 15:10:57 EDT 2017

EHcnck - Fri Sep 29 14:58:29 EDT 2017

determine if a lock exist if so report it then continue on...

How is this done??? a simple check i do would be something along the lines of:

 

Module m = current
m = edit(fullName(m),true)

if (null m){ //the module is locked }

 

DOORS will still send a Request Lock pop-up message that stops the script though

Re: How to Bypass Request Lock message
EHcnck - Fri Sep 29 15:22:18 EDT 2017

ABoucaud - Fri Sep 29 15:10:57 EDT 2017

How is this done??? a simple check i do would be something along the lines of:

 

Module m = current
m = edit(fullName(m),true)

if (null m){ //the module is locked }

 

DOORS will still send a Request Lock pop-up message that stops the script though

Look at the "Locking" section is the DXL reference manual 

Re: How to Bypass Request Lock message
Mathias Mamsch - Mon Oct 02 03:54:27 EDT 2017

ABoucaud - Fri Sep 29 15:10:57 EDT 2017

How is this done??? a simple check i do would be something along the lines of:

 

Module m = current
m = edit(fullName(m),true)

if (null m){ //the module is locked }

 

DOORS will still send a Request Lock pop-up message that stops the script though

There is a "silent" parameter on the edit perm ... 

Module edit(string name[,bool disp[, bool silent[, bool loadStandardView]]])

If you pass silent = true you should get no message and can perform the null check.  Regards, Mathias

Re: How to Bypass Request Lock message
ABoucaud - Tue Oct 03 13:55:18 EDT 2017

Mathias Mamsch - Mon Oct 02 03:54:27 EDT 2017

There is a "silent" parameter on the edit perm ... 

Module edit(string name[,bool disp[, bool silent[, bool loadStandardView]]])

If you pass silent = true you should get no message and can perform the null check.  Regards, Mathias

I dont know where I read it (maybe forums or somewhere in the manual) that the bool expressions in the Module edit command don't matter too much. WRONG.  I've been programming in DXL for almost a year now and i had no idea that they do matter! I simply just set the second bool expression in the command to 'true' and my problem is solved!  I love you Mathias!! Thank you.